package net.sharpf2.api.info;

import net.sharpf2.api.Globals;
import net.sharpf2.api.game.Interfaces;

/**
 *
 * @author Piotr Gajdowski
 */
public class HP {
    
    /**
     * Gets the current HP.
     * @return Current HP.
    */
    public static int currentHP() {
        if (Interfaces.isInterfaceValid(748) && Globals.CLIENT.getGamestate() == 11) {
            return (int)Integer.parseInt(Interfaces.get(748, 8).getContent().getText());
        }
        return -1;
    }
    
}
